<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <!-- <div id="box" class="test" title="" data-id="20" align="center">123</div> -->
    <input type="button" value="提交" disabled="disabled">
    <input type="checkbox">
    <script>
        let check = document.querySelector("[type=checkbox]")
        document.querySelector("[type=button]").onclick = function() {
                if (check.checked) {
                    check.checked = false;
                } else {
                    check.checked = true;
                }

            }
            // let div = document.querySelector("div");
            // let x = div.attributes.id;
            // console.log(x)
            // console.log(div.id)
            // console.log(div.className)
            // div.id = "xxxxx";
            // div.className = "yyyyy";
            // div.dataset.haha = "haha";
            // console.log(div.getAttribute('data-haha'))
            // console.log(div.getAttributeNames())
            // div.setAttribute("index", 333);
            // console.log(div.hasAttribute("align"))
            // console.log(div.hasAttributes())
            // div.removeAttribute("class")
    </script>
</body>

</html>